/*
 * Interface.java
 */

package damas2;

import java.awt.Desktop;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 * The application's main frame.
 */
public class Interface extends FrameView {

    /*************/
    /*Construtor */
    /*************/
    public Interface(SingleFrameApplication app) {
        super(app);
        initComponents();
        getFrame().setResizable(false);
        /*Inicializações dos ícones*/
        vermelhoRealce.setVisible(false);
        azulRealce.setVisible(false);
        vazio.setVisible(false);
        azul.setVisible(false);
        vrmelha.setVisible(false);
        damaVermelha.setVisible(false);
        damaAzul.setVisible(false);
        jMenu_Estatistica.setEnabled(false);
        damaAzulRealce.setVisible(false);
        damaVermelhaRealce.setVisible(false);

        Escreve("Escolha Jogo > Novo Jogo para iniciar");


        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);
        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    /*******/
    /*Ações*/
    /*******/
    @Action
    public void showAboutBox() {
        //if (aboutBox == null) {
            JFrame mainFrame = Damas2App.getApplication().getMainFrame();
            aboutBox = new Sobre(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        //}
        Damas2App.getApplication().show(aboutBox);
    }

    @Action
    public void showEstatisticaBox() {
        /*if (EstatisticaBox == null) {*/
            JFrame mainFrame = Damas2App.getApplication().getMainFrame();
            EstatisticaBox = new Estatistica(mainFrame, jogador);
            EstatisticaBox.setLocationRelativeTo(mainFrame);
        //}
        Damas2App.getApplication().show(EstatisticaBox);
    }

    @Action
    public void showNovoJogoBox() {
        JFrame mainFrame = Damas2App.getApplication().getMainFrame();
        NovoJogoBox = new Novo_Jogo(mainFrame);
        NovoJogoBox.setLocationRelativeTo(mainFrame);
        Damas2App.getApplication().show(NovoJogoBox);
        txt_msg.setText("");
        String nome= NovoJogoBox.getJogador();
        jogador = new Jogador(nome);
        engine = new Engine();
        engine.Habilita_tabuleiro(true);
        jogador.setPartidas(jogador.getPartidas() + 1); //Adiciona uma partida ao jogador
        jMenu_Estatistica.setEnabled(true);
        lbl_jogador.setText(jogador.getNome());
        Escreve("Seja Bem vindo,"+jogador.getNome());
        Escreve("Jogo Iniciado: Jogue com as peças brancas");
        Escreve("Sua vez");
    }



    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        jButtonBranco70 = new javax.swing.JButton();
        jButton71 = new javax.swing.JButton();
        jButtonBranco72 = new javax.swing.JButton();
        jButton73 = new javax.swing.JButton();
        jButtonBranco74 = new javax.swing.JButton();
        jButton75 = new javax.swing.JButton();
        jButtonBranco76 = new javax.swing.JButton();
        jButton77 = new javax.swing.JButton();
        jButton60 = new javax.swing.JButton();
        jButtonBranco61 = new javax.swing.JButton();
        jButton62 = new javax.swing.JButton();
        jButtonBranco63 = new javax.swing.JButton();
        jButton64 = new javax.swing.JButton();
        jButtonBranco65 = new javax.swing.JButton();
        jButton66 = new javax.swing.JButton();
        jButtonBranco67 = new javax.swing.JButton();
        jButton53 = new javax.swing.JButton();
        jButton55 = new javax.swing.JButton();
        jButtonBranco54 = new javax.swing.JButton();
        jButton57 = new javax.swing.JButton();
        jButtonBranco56 = new javax.swing.JButton();
        jButtonBranco41 = new javax.swing.JButton();
        jButton40 = new javax.swing.JButton();
        jButtonBranco47 = new javax.swing.JButton();
        jButtonBranco43 = new javax.swing.JButton();
        jButton42 = new javax.swing.JButton();
        jButtonBranco45 = new javax.swing.JButton();
        jButton46 = new javax.swing.JButton();
        jButton44 = new javax.swing.JButton();
        jButtonBranco50 = new javax.swing.JButton();
        jButton51 = new javax.swing.JButton();
        jButtonBranco52 = new javax.swing.JButton();
        jButton33 = new javax.swing.JButton();
        jButton35 = new javax.swing.JButton();
        jButtonBranco34 = new javax.swing.JButton();
        jButton37 = new javax.swing.JButton();
        jButtonBranco36 = new javax.swing.JButton();
        jButtonBranco21 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jButtonBranco27 = new javax.swing.JButton();
        jButtonBranco23 = new javax.swing.JButton();
        jButton22 = new javax.swing.JButton();
        jButtonBranco25 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();
        jButton24 = new javax.swing.JButton();
        jButtonBranco30 = new javax.swing.JButton();
        jButton31 = new javax.swing.JButton();
        jButtonBranco32 = new javax.swing.JButton();
        jButton13 = new javax.swing.JButton();
        jButton15 = new javax.swing.JButton();
        jButtonBranco14 = new javax.swing.JButton();
        jButton17 = new javax.swing.JButton();
        jButtonBranco16 = new javax.swing.JButton();
        jButtonBranco01 = new javax.swing.JButton();
        jButton00 = new javax.swing.JButton();
        jButtonBranco07 = new javax.swing.JButton();
        jButtonBranco03 = new javax.swing.JButton();
        jButton02 = new javax.swing.JButton();
        jButtonBranco05 = new javax.swing.JButton();
        jButton06 = new javax.swing.JButton();
        jButton04 = new javax.swing.JButton();
        jButtonBranco10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jButtonBranco12 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        txt_msg = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        lbl_jogador = new javax.swing.JLabel();
        vrmelha = new javax.swing.JButton();
        azul = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        azulRealce = new javax.swing.JButton();
        vazio = new javax.swing.JButton();
        vermelhoRealce = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        damaAzul = new javax.swing.JButton();
        damaVermelha = new javax.swing.JButton();
        damaAzulRealce = new javax.swing.JButton();
        damaVermelhaRealce = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu_Estatistica = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(damas2.Damas2App.class).getContext().getResourceMap(Interface.class);
        mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N
        mainPanel.setToolTipText(resourceMap.getString("mainPanel.toolTipText")); // NOI18N
        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setPreferredSize(new java.awt.Dimension(558, 558));
        mainPanel.setVerifyInputWhenFocusTarget(false);
        mainPanel.setLayout(null);

        jButtonBranco70.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco70.setText(resourceMap.getString("jButtonBranco70.text")); // NOI18N
        jButtonBranco70.setBorderPainted(false);
        jButtonBranco70.setEnabled(false);
        jButtonBranco70.setName("jButtonBranco70"); // NOI18N
        mainPanel.add(jButtonBranco70);
        jButtonBranco70.setBounds(219, 11, 57, 50);

        jButton71.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton71.setText(resourceMap.getString("jButton71.text")); // NOI18N
        jButton71.setBorderPainted(false);
        jButton71.setEnabled(false);
        jButton71.setName("jButton71"); // NOI18N
        jButton71.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton71MouseClicked(evt);
            }
        });
        mainPanel.add(jButton71);
        jButton71.setBounds(276, 11, 57, 50);

        jButtonBranco72.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco72.setText(resourceMap.getString("jButtonBranco72.text")); // NOI18N
        jButtonBranco72.setBorderPainted(false);
        jButtonBranco72.setEnabled(false);
        jButtonBranco72.setName("jButtonBranco72"); // NOI18N
        mainPanel.add(jButtonBranco72);
        jButtonBranco72.setBounds(333, 11, 57, 50);

        jButton73.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton73.setText(resourceMap.getString("jButton73.text")); // NOI18N
        jButton73.setBorderPainted(false);
        jButton73.setEnabled(false);
        jButton73.setName("jButton73"); // NOI18N
        jButton73.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton73MouseClicked(evt);
            }
        });
        mainPanel.add(jButton73);
        jButton73.setBounds(390, 11, 57, 50);

        jButtonBranco74.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco74.setText(resourceMap.getString("jButtonBranco74.text")); // NOI18N
        jButtonBranco74.setBorderPainted(false);
        jButtonBranco74.setEnabled(false);
        jButtonBranco74.setName("jButtonBranco74"); // NOI18N
        mainPanel.add(jButtonBranco74);
        jButtonBranco74.setBounds(447, 11, 57, 50);

        jButton75.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton75.setText(resourceMap.getString("jButton75.text")); // NOI18N
        jButton75.setBorderPainted(false);
        jButton75.setEnabled(false);
        jButton75.setName("jButton75"); // NOI18N
        jButton75.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton75MouseClicked(evt);
            }
        });
        mainPanel.add(jButton75);
        jButton75.setBounds(504, 11, 57, 50);

        jButtonBranco76.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco76.setText(resourceMap.getString("jButtonBranco76.text")); // NOI18N
        jButtonBranco76.setBorderPainted(false);
        jButtonBranco76.setEnabled(false);
        jButtonBranco76.setName("jButtonBranco76"); // NOI18N
        mainPanel.add(jButtonBranco76);
        jButtonBranco76.setBounds(561, 11, 57, 50);

        jButton77.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton77.setText(resourceMap.getString("jButton77.text")); // NOI18N
        jButton77.setBorderPainted(false);
        jButton77.setEnabled(false);
        jButton77.setName("jButton77"); // NOI18N
        jButton77.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton77MouseClicked(evt);
            }
        });
        mainPanel.add(jButton77);
        jButton77.setBounds(618, 11, 57, 50);

        jButton60.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton60.setText(resourceMap.getString("jButton60.text")); // NOI18N
        jButton60.setBorderPainted(false);
        jButton60.setEnabled(false);
        jButton60.setName("jButton60"); // NOI18N
        jButton60.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton60MouseClicked(evt);
            }
        });
        mainPanel.add(jButton60);
        jButton60.setBounds(219, 61, 57, 50);

        jButtonBranco61.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco61.setText(resourceMap.getString("jButtonBranco61.text")); // NOI18N
        jButtonBranco61.setBorderPainted(false);
        jButtonBranco61.setEnabled(false);
        jButtonBranco61.setName("jButtonBranco61"); // NOI18N
        mainPanel.add(jButtonBranco61);
        jButtonBranco61.setBounds(276, 61, 57, 50);

        jButton62.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton62.setText(resourceMap.getString("jButton62.text")); // NOI18N
        jButton62.setBorderPainted(false);
        jButton62.setEnabled(false);
        jButton62.setName("jButton62"); // NOI18N
        jButton62.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton62MouseClicked(evt);
            }
        });
        mainPanel.add(jButton62);
        jButton62.setBounds(333, 61, 57, 50);

        jButtonBranco63.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco63.setText(resourceMap.getString("jButtonBranco63.text")); // NOI18N
        jButtonBranco63.setBorderPainted(false);
        jButtonBranco63.setEnabled(false);
        jButtonBranco63.setName("jButtonBranco63"); // NOI18N
        mainPanel.add(jButtonBranco63);
        jButtonBranco63.setBounds(390, 61, 57, 50);

        jButton64.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton64.setText(resourceMap.getString("jButton64.text")); // NOI18N
        jButton64.setBorderPainted(false);
        jButton64.setEnabled(false);
        jButton64.setName("jButton64"); // NOI18N
        jButton64.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton64MouseClicked(evt);
            }
        });
        mainPanel.add(jButton64);
        jButton64.setBounds(447, 61, 57, 50);

        jButtonBranco65.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco65.setText(resourceMap.getString("jButtonBranco65.text")); // NOI18N
        jButtonBranco65.setBorderPainted(false);
        jButtonBranco65.setEnabled(false);
        jButtonBranco65.setName("jButtonBranco65"); // NOI18N
        mainPanel.add(jButtonBranco65);
        jButtonBranco65.setBounds(504, 61, 57, 50);

        jButton66.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton66.setText(resourceMap.getString("jButton66.text")); // NOI18N
        jButton66.setBorderPainted(false);
        jButton66.setEnabled(false);
        jButton66.setName("jButton66"); // NOI18N
        jButton66.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton66MouseClicked(evt);
            }
        });
        mainPanel.add(jButton66);
        jButton66.setBounds(561, 61, 57, 50);

        jButtonBranco67.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco67.setText(resourceMap.getString("jButtonBranco67.text")); // NOI18N
        jButtonBranco67.setBorderPainted(false);
        jButtonBranco67.setEnabled(false);
        jButtonBranco67.setName("jButtonBranco67"); // NOI18N
        mainPanel.add(jButtonBranco67);
        jButtonBranco67.setBounds(618, 61, 57, 50);

        jButton53.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton53.setText(resourceMap.getString("jButton53.text")); // NOI18N
        jButton53.setBorderPainted(false);
        jButton53.setEnabled(false);
        jButton53.setName("jButton53"); // NOI18N
        jButton53.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton53MouseClicked(evt);
            }
        });
        mainPanel.add(jButton53);
        jButton53.setBounds(390, 111, 57, 50);

        jButton55.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton55.setText(resourceMap.getString("jButton55.text")); // NOI18N
        jButton55.setBorderPainted(false);
        jButton55.setEnabled(false);
        jButton55.setName("jButton55"); // NOI18N
        jButton55.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton55MouseClicked(evt);
            }
        });
        mainPanel.add(jButton55);
        jButton55.setBounds(504, 111, 57, 50);

        jButtonBranco54.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco54.setText(resourceMap.getString("jButtonBranco54.text")); // NOI18N
        jButtonBranco54.setBorderPainted(false);
        jButtonBranco54.setEnabled(false);
        jButtonBranco54.setName("jButtonBranco54"); // NOI18N
        mainPanel.add(jButtonBranco54);
        jButtonBranco54.setBounds(447, 111, 57, 50);

        jButton57.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton57.setText(resourceMap.getString("jButton57.text")); // NOI18N
        jButton57.setBorderPainted(false);
        jButton57.setEnabled(false);
        jButton57.setName("jButton57"); // NOI18N
        jButton57.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton57MouseClicked(evt);
            }
        });
        mainPanel.add(jButton57);
        jButton57.setBounds(618, 111, 57, 50);

        jButtonBranco56.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco56.setText(resourceMap.getString("jButtonBranco56.text")); // NOI18N
        jButtonBranco56.setBorderPainted(false);
        jButtonBranco56.setEnabled(false);
        jButtonBranco56.setName("jButtonBranco56"); // NOI18N
        mainPanel.add(jButtonBranco56);
        jButtonBranco56.setBounds(561, 111, 57, 50);

        jButtonBranco41.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco41.setText(resourceMap.getString("jButtonBranco41.text")); // NOI18N
        jButtonBranco41.setBorderPainted(false);
        jButtonBranco41.setEnabled(false);
        jButtonBranco41.setName("jButtonBranco41"); // NOI18N
        mainPanel.add(jButtonBranco41);
        jButtonBranco41.setBounds(276, 161, 57, 50);

        jButton40.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton40.setText(resourceMap.getString("jButton40.text")); // NOI18N
        jButton40.setBorderPainted(false);
        jButton40.setEnabled(false);
        jButton40.setName("jButton40"); // NOI18N
        jButton40.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton40MouseClicked(evt);
            }
        });
        mainPanel.add(jButton40);
        jButton40.setBounds(219, 161, 57, 50);

        jButtonBranco47.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco47.setText(resourceMap.getString("jButtonBranco47.text")); // NOI18N
        jButtonBranco47.setBorderPainted(false);
        jButtonBranco47.setEnabled(false);
        jButtonBranco47.setName("jButtonBranco47"); // NOI18N
        mainPanel.add(jButtonBranco47);
        jButtonBranco47.setBounds(618, 161, 57, 50);

        jButtonBranco43.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco43.setText(resourceMap.getString("jButtonBranco43.text")); // NOI18N
        jButtonBranco43.setBorderPainted(false);
        jButtonBranco43.setEnabled(false);
        jButtonBranco43.setName("jButtonBranco43"); // NOI18N
        mainPanel.add(jButtonBranco43);
        jButtonBranco43.setBounds(390, 161, 57, 50);

        jButton42.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton42.setText(resourceMap.getString("jButton42.text")); // NOI18N
        jButton42.setBorderPainted(false);
        jButton42.setEnabled(false);
        jButton42.setName("jButton42"); // NOI18N
        jButton42.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton42MouseClicked(evt);
            }
        });
        mainPanel.add(jButton42);
        jButton42.setBounds(333, 161, 57, 50);

        jButtonBranco45.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco45.setText(resourceMap.getString("jButtonBranco45.text")); // NOI18N
        jButtonBranco45.setBorderPainted(false);
        jButtonBranco45.setEnabled(false);
        jButtonBranco45.setName("jButtonBranco45"); // NOI18N
        mainPanel.add(jButtonBranco45);
        jButtonBranco45.setBounds(504, 161, 57, 50);

        jButton46.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton46.setText(resourceMap.getString("jButton46.text")); // NOI18N
        jButton46.setBorderPainted(false);
        jButton46.setEnabled(false);
        jButton46.setName("jButton46"); // NOI18N
        jButton46.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton46MouseClicked(evt);
            }
        });
        mainPanel.add(jButton46);
        jButton46.setBounds(561, 161, 57, 50);

        jButton44.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton44.setText(resourceMap.getString("jButton44.text")); // NOI18N
        jButton44.setBorderPainted(false);
        jButton44.setEnabled(false);
        jButton44.setName("jButton44"); // NOI18N
        jButton44.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton44MouseClicked(evt);
            }
        });
        mainPanel.add(jButton44);
        jButton44.setBounds(447, 161, 57, 50);

        jButtonBranco50.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco50.setText(resourceMap.getString("jButtonBranco50.text")); // NOI18N
        jButtonBranco50.setBorderPainted(false);
        jButtonBranco50.setEnabled(false);
        jButtonBranco50.setName("jButtonBranco50"); // NOI18N
        mainPanel.add(jButtonBranco50);
        jButtonBranco50.setBounds(219, 111, 57, 50);

        jButton51.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton51.setText(resourceMap.getString("jButton51.text")); // NOI18N
        jButton51.setBorderPainted(false);
        jButton51.setEnabled(false);
        jButton51.setName("jButton51"); // NOI18N
        jButton51.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton51MouseClicked(evt);
            }
        });
        mainPanel.add(jButton51);
        jButton51.setBounds(276, 111, 57, 50);

        jButtonBranco52.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco52.setText(resourceMap.getString("jButtonBranco52.text")); // NOI18N
        jButtonBranco52.setBorderPainted(false);
        jButtonBranco52.setEnabled(false);
        jButtonBranco52.setName("jButtonBranco52"); // NOI18N
        mainPanel.add(jButtonBranco52);
        jButtonBranco52.setBounds(333, 111, 57, 50);

        jButton33.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton33.setText(resourceMap.getString("jButton33.text")); // NOI18N
        jButton33.setBorderPainted(false);
        jButton33.setEnabled(false);
        jButton33.setName("jButton33"); // NOI18N
        jButton33.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton33MouseClicked(evt);
            }
        });
        mainPanel.add(jButton33);
        jButton33.setBounds(390, 211, 57, 50);

        jButton35.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton35.setText(resourceMap.getString("jButton35.text")); // NOI18N
        jButton35.setBorderPainted(false);
        jButton35.setEnabled(false);
        jButton35.setName("jButton35"); // NOI18N
        jButton35.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton35MouseClicked(evt);
            }
        });
        mainPanel.add(jButton35);
        jButton35.setBounds(504, 211, 57, 50);

        jButtonBranco34.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco34.setText(resourceMap.getString("jButtonBranco34.text")); // NOI18N
        jButtonBranco34.setBorderPainted(false);
        jButtonBranco34.setEnabled(false);
        jButtonBranco34.setName("jButtonBranco34"); // NOI18N
        mainPanel.add(jButtonBranco34);
        jButtonBranco34.setBounds(447, 211, 57, 50);

        jButton37.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton37.setText(resourceMap.getString("jButton37.text")); // NOI18N
        jButton37.setBorderPainted(false);
        jButton37.setEnabled(false);
        jButton37.setName("jButton37"); // NOI18N
        jButton37.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton37MouseClicked(evt);
            }
        });
        mainPanel.add(jButton37);
        jButton37.setBounds(618, 211, 57, 50);

        jButtonBranco36.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco36.setText(resourceMap.getString("jButtonBranco36.text")); // NOI18N
        jButtonBranco36.setBorderPainted(false);
        jButtonBranco36.setEnabled(false);
        jButtonBranco36.setName("jButtonBranco36"); // NOI18N
        mainPanel.add(jButtonBranco36);
        jButtonBranco36.setBounds(561, 211, 57, 50);

        jButtonBranco21.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco21.setText(resourceMap.getString("jButtonBranco21.text")); // NOI18N
        jButtonBranco21.setBorderPainted(false);
        jButtonBranco21.setEnabled(false);
        jButtonBranco21.setName("jButtonBranco21"); // NOI18N
        mainPanel.add(jButtonBranco21);
        jButtonBranco21.setBounds(276, 261, 57, 50);

        jButton20.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton20.setText(resourceMap.getString("jButton20.text")); // NOI18N
        jButton20.setBorderPainted(false);
        jButton20.setEnabled(false);
        jButton20.setName("jButton20"); // NOI18N
        jButton20.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton20MouseClicked(evt);
            }
        });
        mainPanel.add(jButton20);
        jButton20.setBounds(219, 261, 57, 50);

        jButtonBranco27.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco27.setText(resourceMap.getString("jButtonBranco27.text")); // NOI18N
        jButtonBranco27.setBorderPainted(false);
        jButtonBranco27.setEnabled(false);
        jButtonBranco27.setName("jButtonBranco27"); // NOI18N
        mainPanel.add(jButtonBranco27);
        jButtonBranco27.setBounds(618, 261, 57, 50);

        jButtonBranco23.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco23.setText(resourceMap.getString("jButtonBranco23.text")); // NOI18N
        jButtonBranco23.setBorderPainted(false);
        jButtonBranco23.setEnabled(false);
        jButtonBranco23.setName("jButtonBranco23"); // NOI18N
        mainPanel.add(jButtonBranco23);
        jButtonBranco23.setBounds(390, 261, 57, 50);

        jButton22.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton22.setText(resourceMap.getString("jButton22.text")); // NOI18N
        jButton22.setBorderPainted(false);
        jButton22.setEnabled(false);
        jButton22.setName("jButton22"); // NOI18N
        jButton22.setSelected(true);
        jButton22.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton22MouseClicked(evt);
            }
        });
        mainPanel.add(jButton22);
        jButton22.setBounds(333, 261, 57, 50);

        jButtonBranco25.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco25.setText(resourceMap.getString("jButtonBranco25.text")); // NOI18N
        jButtonBranco25.setBorderPainted(false);
        jButtonBranco25.setEnabled(false);
        jButtonBranco25.setName("jButtonBranco25"); // NOI18N
        mainPanel.add(jButtonBranco25);
        jButtonBranco25.setBounds(504, 261, 57, 50);

        jButton26.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton26.setText(resourceMap.getString("jButton26.text")); // NOI18N
        jButton26.setBorderPainted(false);
        jButton26.setEnabled(false);
        jButton26.setName("jButton26"); // NOI18N
        jButton26.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton26MouseClicked(evt);
            }
        });
        mainPanel.add(jButton26);
        jButton26.setBounds(561, 261, 57, 50);

        jButton24.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton24.setText(resourceMap.getString("jButton24.text")); // NOI18N
        jButton24.setBorderPainted(false);
        jButton24.setEnabled(false);
        jButton24.setName("jButton24"); // NOI18N
        jButton24.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton24MouseClicked(evt);
            }
        });
        mainPanel.add(jButton24);
        jButton24.setBounds(447, 261, 57, 50);

        jButtonBranco30.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco30.setText(resourceMap.getString("jButtonBranco30.text")); // NOI18N
        jButtonBranco30.setBorderPainted(false);
        jButtonBranco30.setEnabled(false);
        jButtonBranco30.setName("jButtonBranco30"); // NOI18N
        mainPanel.add(jButtonBranco30);
        jButtonBranco30.setBounds(219, 211, 57, 50);

        jButton31.setIcon(resourceMap.getIcon("jButton31.icon")); // NOI18N
        jButton31.setText(resourceMap.getString("jButton31.text")); // NOI18N
        jButton31.setBorderPainted(false);
        jButton31.setEnabled(false);
        jButton31.setName("jButton31"); // NOI18N
        jButton31.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton31MouseClicked(evt);
            }
        });
        mainPanel.add(jButton31);
        jButton31.setBounds(276, 211, 57, 50);

        jButtonBranco32.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco32.setText(resourceMap.getString("jButtonBranco32.text")); // NOI18N
        jButtonBranco32.setBorderPainted(false);
        jButtonBranco32.setEnabled(false);
        jButtonBranco32.setName("jButtonBranco32"); // NOI18N
        mainPanel.add(jButtonBranco32);
        jButtonBranco32.setBounds(333, 211, 57, 50);

        jButton13.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton13.setText(resourceMap.getString("jButton13.text")); // NOI18N
        jButton13.setBorderPainted(false);
        jButton13.setEnabled(false);
        jButton13.setName("jButton13"); // NOI18N
        jButton13.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton13MouseClicked(evt);
            }
        });
        mainPanel.add(jButton13);
        jButton13.setBounds(390, 311, 57, 50);

        jButton15.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton15.setText(resourceMap.getString("jButton15.text")); // NOI18N
        jButton15.setBorderPainted(false);
        jButton15.setEnabled(false);
        jButton15.setName("jButton15"); // NOI18N
        jButton15.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton15MouseClicked(evt);
            }
        });
        mainPanel.add(jButton15);
        jButton15.setBounds(504, 311, 57, 50);

        jButtonBranco14.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco14.setText(resourceMap.getString("jButtonBranco14.text")); // NOI18N
        jButtonBranco14.setBorderPainted(false);
        jButtonBranco14.setEnabled(false);
        jButtonBranco14.setName("jButtonBranco14"); // NOI18N
        mainPanel.add(jButtonBranco14);
        jButtonBranco14.setBounds(447, 311, 57, 50);

        jButton17.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton17.setText(resourceMap.getString("jButton17.text")); // NOI18N
        jButton17.setBorderPainted(false);
        jButton17.setEnabled(false);
        jButton17.setName("jButton17"); // NOI18N
        jButton17.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton17MouseClicked(evt);
            }
        });
        mainPanel.add(jButton17);
        jButton17.setBounds(618, 311, 57, 50);

        jButtonBranco16.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco16.setText(resourceMap.getString("jButtonBranco16.text")); // NOI18N
        jButtonBranco16.setBorderPainted(false);
        jButtonBranco16.setEnabled(false);
        jButtonBranco16.setName("jButtonBranco16"); // NOI18N
        mainPanel.add(jButtonBranco16);
        jButtonBranco16.setBounds(561, 311, 57, 50);

        jButtonBranco01.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco01.setText(resourceMap.getString("jButtonBranco01.text")); // NOI18N
        jButtonBranco01.setBorderPainted(false);
        jButtonBranco01.setEnabled(false);
        jButtonBranco01.setName("jButtonBranco01"); // NOI18N
        mainPanel.add(jButtonBranco01);
        jButtonBranco01.setBounds(276, 361, 57, 50);

        jButton00.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton00.setText(resourceMap.getString("jButton00.text")); // NOI18N
        jButton00.setBorderPainted(false);
        jButton00.setEnabled(false);
        jButton00.setName(resourceMap.getString("jButton00.name")); // NOI18N
        jButton00.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton00MouseClicked(evt);
            }
        });
        mainPanel.add(jButton00);
        jButton00.setBounds(219, 361, 57, 50);

        jButtonBranco07.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco07.setText(resourceMap.getString("jButtonBranco07.text")); // NOI18N
        jButtonBranco07.setBorderPainted(false);
        jButtonBranco07.setEnabled(false);
        jButtonBranco07.setName("jButtonBranco07"); // NOI18N
        mainPanel.add(jButtonBranco07);
        jButtonBranco07.setBounds(618, 361, 57, 50);

        jButtonBranco03.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco03.setText(resourceMap.getString("jButtonBranco03.text")); // NOI18N
        jButtonBranco03.setBorderPainted(false);
        jButtonBranco03.setEnabled(false);
        jButtonBranco03.setName("jButtonBranco03"); // NOI18N
        mainPanel.add(jButtonBranco03);
        jButtonBranco03.setBounds(390, 361, 57, 50);

        jButton02.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton02.setText(resourceMap.getString("jButton02.text")); // NOI18N
        jButton02.setBorderPainted(false);
        jButton02.setEnabled(false);
        jButton02.setName("jButton02"); // NOI18N
        jButton02.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton02MouseClicked(evt);
            }
        });
        mainPanel.add(jButton02);
        jButton02.setBounds(333, 361, 57, 50);

        jButtonBranco05.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco05.setText(resourceMap.getString("jButtonBranco05.text")); // NOI18N
        jButtonBranco05.setBorderPainted(false);
        jButtonBranco05.setEnabled(false);
        jButtonBranco05.setName("jButtonBranco05"); // NOI18N
        mainPanel.add(jButtonBranco05);
        jButtonBranco05.setBounds(504, 361, 57, 50);

        jButton06.setIcon(resourceMap.getIcon("jButton06.icon")); // NOI18N
        jButton06.setText(resourceMap.getString("jButton06.text")); // NOI18N
        jButton06.setBorderPainted(false);
        jButton06.setEnabled(false);
        jButton06.setName("jButton06"); // NOI18N
        jButton06.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton06MouseClicked(evt);
            }
        });
        mainPanel.add(jButton06);
        jButton06.setBounds(561, 361, 57, 50);

        jButton04.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton04.setText(resourceMap.getString("jButton04.text")); // NOI18N
        jButton04.setBorderPainted(false);
        jButton04.setEnabled(false);
        jButton04.setName("jButton04"); // NOI18N
        jButton04.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton04MouseClicked(evt);
            }
        });
        mainPanel.add(jButton04);
        jButton04.setBounds(447, 361, 57, 50);

        jButtonBranco10.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco10.setText(resourceMap.getString("jButtonBranco10.text")); // NOI18N
        jButtonBranco10.setBorderPainted(false);
        jButtonBranco10.setEnabled(false);
        jButtonBranco10.setName("jButtonBranco10"); // NOI18N
        mainPanel.add(jButtonBranco10);
        jButtonBranco10.setBounds(219, 311, 57, 50);

        jButton11.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton11.setBorderPainted(false);
        jButton11.setEnabled(false);
        jButton11.setName("jButton11"); // NOI18N
        jButton11.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton11MouseClicked(evt);
            }
        });
        mainPanel.add(jButton11);
        jButton11.setBounds(276, 311, 57, 50);

        jButtonBranco12.setIcon(resourceMap.getIcon("jButton22.icon")); // NOI18N
        jButtonBranco12.setText(resourceMap.getString("jButtonBranco12.text")); // NOI18N
        jButtonBranco12.setBorderPainted(false);
        jButtonBranco12.setEnabled(false);
        jButtonBranco12.setName("jButtonBranco12"); // NOI18N
        mainPanel.add(jButtonBranco12);
        jButtonBranco12.setBounds(333, 311, 57, 50);

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        txt_msg.setColumns(20);
        txt_msg.setEditable(false);
        txt_msg.setTabSize(2);
        txt_msg.setBorder(null);
        txt_msg.setName("txt_msg"); // NOI18N
        jScrollPane1.setViewportView(txt_msg);

        mainPanel.add(jScrollPane1);
        jScrollPane1.setBounds(198, 429, 583, 87);

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        mainPanel.add(jLabel1);
        jLabel1.setBounds(750, 60, 50, 30);

        lbl_jogador.setFont(resourceMap.getFont("lbl_jogador.font")); // NOI18N
        lbl_jogador.setText(resourceMap.getString("lbl_jogador.text")); // NOI18N
        lbl_jogador.setName("lbl_jogador"); // NOI18N
        mainPanel.add(lbl_jogador);
        lbl_jogador.setBounds(740, 330, 150, 40);

        vrmelha.setIcon(resourceMap.getIcon("vrmelha.icon")); // NOI18N
        vrmelha.setName("vrmelha"); // NOI18N
        mainPanel.add(vrmelha);
        vrmelha.setBounds(675, 111, 57, 50);

        azul.setIcon(resourceMap.getIcon("azul.icon")); // NOI18N
        azul.setName("azul"); // NOI18N
        mainPanel.add(azul);
        azul.setBounds(675, 161, 57, 50);

        jLabel2.setIcon(resourceMap.getIcon("jLabel2.icon")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        mainPanel.add(jLabel2);
        jLabel2.setBounds(10, 10, 57, 64);

        azulRealce.setIcon(resourceMap.getIcon("azulRealce.icon")); // NOI18N
        azulRealce.setName("azulRealce"); // NOI18N
        mainPanel.add(azulRealce);
        azulRealce.setBounds(160, 210, 57, 50);

        vazio.setIcon(resourceMap.getIcon("vazio.icon")); // NOI18N
        vazio.setName("vazio"); // NOI18N
        mainPanel.add(vazio);
        vazio.setBounds(675, 211, 57, 50);

        vermelhoRealce.setIcon(resourceMap.getIcon("vermelhoRealce.icon")); // NOI18N
        vermelhoRealce.setName("vermelhoRealce"); // NOI18N
        mainPanel.add(vermelhoRealce);
        vermelhoRealce.setBounds(160, 260, 60, 50);

        jLabel3.setIcon(resourceMap.getIcon("jLabel3.icon")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        mainPanel.add(jLabel3);
        jLabel3.setBounds(710, 10, 120, 130);

        jLabel4.setIcon(resourceMap.getIcon("jLabel4.icon")); // NOI18N
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        mainPanel.add(jLabel4);
        jLabel4.setBounds(710, 290, 120, 130);

        damaAzul.setIcon(resourceMap.getIcon("damaAzul.icon")); // NOI18N
        damaAzul.setText(resourceMap.getString("damaAzul.text")); // NOI18N
        damaAzul.setName("damaAzul"); // NOI18N
        mainPanel.add(damaAzul);
        damaAzul.setBounds(160, 113, 60, 50);

        damaVermelha.setIcon(resourceMap.getIcon("damaVermelha.icon")); // NOI18N
        damaVermelha.setText(resourceMap.getString("damaVermelha.text")); // NOI18N
        damaVermelha.setName("damaVermelha"); // NOI18N
        mainPanel.add(damaVermelha);
        damaVermelha.setBounds(160, 163, 60, 50);

        damaAzulRealce.setIcon(resourceMap.getIcon("damaAzulRealce.icon")); // NOI18N
        damaAzulRealce.setText(resourceMap.getString("damaAzulRealce.text")); // NOI18N
        damaAzulRealce.setName("damaAzulRealce"); // NOI18N
        mainPanel.add(damaAzulRealce);
        damaAzulRealce.setBounds(160, 310, 60, 50);

        damaVermelhaRealce.setIcon(resourceMap.getIcon("damaVermelhaRealce.icon")); // NOI18N
        damaVermelhaRealce.setText(resourceMap.getString("damaVermelhaRealce.text")); // NOI18N
        damaVermelhaRealce.setName("damaVermelhaRealce"); // NOI18N
        mainPanel.add(damaVermelhaRealce);
        damaVermelhaRealce.setBounds(160, 360, 60, 50);

        menuBar.setName("menuBar"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(damas2.Damas2App.class).getContext().getActionMap(Interface.class, this);
        fileMenu.setAction(actionMap.get("Encerra_jogo")); // NOI18N
        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        jMenuItem1.setAction(actionMap.get("showNovoJogoBox")); // NOI18N
        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        fileMenu.add(jMenuItem1);

        jMenu_Estatistica.setAction(actionMap.get("showEstatisticaBox")); // NOI18N
        jMenu_Estatistica.setText(resourceMap.getString("jMenu_Estatistica.text")); // NOI18N
        jMenu_Estatistica.setName("jMenu_Estatistica"); // NOI18N
        fileMenu.add(jMenu_Estatistica);

        exitMenuItem.setAction(actionMap.get("Encerra_jogo")); // NOI18N
        exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setMnemonic('A');
        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem3.setMnemonic('M');
        jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N
        jMenuItem3.setName("jMenuItem3"); // NOI18N
        helpMenu.add(jMenuItem3);

        jMenuItem4.setAction(actionMap.get("Pdf")); // NOI18N
        jMenuItem4.setText(resourceMap.getString("jMenuItem4.text")); // NOI18N
        jMenuItem4.setName("jMenuItem4"); // NOI18N
        helpMenu.add(jMenuItem4);

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 1003, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 833, Short.MAX_VALUE)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents


    /****************************************************************/
    /* Métodos auxiliares*/
    /****************************************************************/

   public void Escreve(String msg){
        txt_msg.append("\n"+msg);
    }

    
    @Action
    public void Pdf() {
    File pdf = new File("src/Documentacao/regras.pdf");     //Pode arrastar o pdf direto de onde tá pro src do projeto
    try {
     Desktop.getDesktop().open(pdf);
    } catch(Exception ex) {
   ex.printStackTrace();
      JOptionPane.showMessageDialog(null, "Não foi possível abrir o PDF " );
    }      }

    @Action
    public void Encerra_jogo (){
    /*PopUp confirmando*/
    int conf = JOptionPane.showConfirmDialog(null, "Voce Realmente deseja sair do jogo? Se você sair será contabilizado uma derrota na suas estatísticas","Sair do jogo", JOptionPane.YES_NO_OPTION);
    if (conf != 1) {
        /*Fecha o programa*/
        System.exit(0);
    }

    }




    private void jButton26MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton26MouseClicked
        // TODO add your handling code here:
        engine.jogada(jButton26);
    }//GEN-LAST:event_jButton26MouseClicked

    private void jButton37MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton37MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton37);

    }//GEN-LAST:event_jButton37MouseClicked

    private void jButton00MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton00MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton00);


    }//GEN-LAST:event_jButton00MouseClicked

    private void jButton02MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton02MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton02);


    }//GEN-LAST:event_jButton02MouseClicked

    private void jButton04MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton04MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton04);

   
    }//GEN-LAST:event_jButton04MouseClicked

    private void jButton06MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton06MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton06);

   
    }//GEN-LAST:event_jButton06MouseClicked

    private void jButton11MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton11MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton11);

    
    }//GEN-LAST:event_jButton11MouseClicked

    private void jButton13MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton13MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton13);

   
    }//GEN-LAST:event_jButton13MouseClicked

    private void jButton15MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton15MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton15);

  
    }//GEN-LAST:event_jButton15MouseClicked

    private void jButton17MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton17MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton17);


    }//GEN-LAST:event_jButton17MouseClicked

    private void jButton20MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton20MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton20);


    }//GEN-LAST:event_jButton20MouseClicked

    private void jButton22MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton22MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton22);


    }//GEN-LAST:event_jButton22MouseClicked

    private void jButton24MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton24MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton24);


    }//GEN-LAST:event_jButton24MouseClicked

    private void jButton31MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton31MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton31);

    }//GEN-LAST:event_jButton31MouseClicked

    private void jButton33MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton33MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton33);


    }//GEN-LAST:event_jButton33MouseClicked

    private void jButton35MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton35MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton35);


    }//GEN-LAST:event_jButton35MouseClicked

    private void jButton40MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton40MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton40);


    }//GEN-LAST:event_jButton40MouseClicked

    private void jButton42MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton42MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton42);

 
    }//GEN-LAST:event_jButton42MouseClicked

    private void jButton44MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton44MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton44);


    }//GEN-LAST:event_jButton44MouseClicked

    private void jButton46MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton46MouseClicked
        // TODO add your handling code here:
    engine.jogada(jButton46);
    }//GEN-LAST:event_jButton46MouseClicked

    private void jButton57MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton57MouseClicked
        engine.jogada(jButton57);
    }//GEN-LAST:event_jButton57MouseClicked

    private void jButton55MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton55MouseClicked
        engine.jogada(jButton55);
    }//GEN-LAST:event_jButton55MouseClicked

    private void jButton53MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton53MouseClicked
        engine.jogada(jButton53);
    }//GEN-LAST:event_jButton53MouseClicked

    private void jButton51MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton51MouseClicked
        engine.jogada(jButton51);
    }//GEN-LAST:event_jButton51MouseClicked

    private void jButton66MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton66MouseClicked
       engine.jogada(jButton66);
    }//GEN-LAST:event_jButton66MouseClicked

    private void jButton64MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton64MouseClicked
        engine.jogada(jButton64);
    }//GEN-LAST:event_jButton64MouseClicked

    private void jButton62MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton62MouseClicked
       engine.jogada(jButton62);
    }//GEN-LAST:event_jButton62MouseClicked

    private void jButton60MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton60MouseClicked
        engine.jogada(jButton60);
    }//GEN-LAST:event_jButton60MouseClicked

    private void jButton77MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton77MouseClicked
        engine.jogada(jButton77);
    }//GEN-LAST:event_jButton77MouseClicked

    private void jButton75MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton75MouseClicked
       engine.jogada(jButton75);
    }//GEN-LAST:event_jButton75MouseClicked

    private void jButton73MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton73MouseClicked
        engine.jogada(jButton73);
    }//GEN-LAST:event_jButton73MouseClicked

    private void jButton71MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton71MouseClicked
        engine.jogada(jButton71);
    }//GEN-LAST:event_jButton71MouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JButton azul;
    public static javax.swing.JButton azulRealce;
    public static javax.swing.JButton damaAzul;
    public static javax.swing.JButton damaAzulRealce;
    public static javax.swing.JButton damaVermelha;
    public static javax.swing.JButton damaVermelhaRealce;
    javax.swing.JMenu fileMenu;
    public static javax.swing.JButton jButton00;
    public static javax.swing.JButton jButton02;
    public static javax.swing.JButton jButton04;
    public static javax.swing.JButton jButton06;
    public static javax.swing.JButton jButton11;
    public static javax.swing.JButton jButton13;
    public static javax.swing.JButton jButton15;
    public static javax.swing.JButton jButton17;
    public static javax.swing.JButton jButton20;
    public static javax.swing.JButton jButton22;
    public static javax.swing.JButton jButton24;
    public static javax.swing.JButton jButton26;
    public static javax.swing.JButton jButton31;
    public static javax.swing.JButton jButton33;
    public static javax.swing.JButton jButton35;
    public static javax.swing.JButton jButton37;
    public static javax.swing.JButton jButton40;
    public static javax.swing.JButton jButton42;
    public static javax.swing.JButton jButton44;
    public static javax.swing.JButton jButton46;
    public static javax.swing.JButton jButton51;
    public static javax.swing.JButton jButton53;
    public static javax.swing.JButton jButton55;
    public static javax.swing.JButton jButton57;
    public static javax.swing.JButton jButton60;
    public static javax.swing.JButton jButton62;
    public static javax.swing.JButton jButton64;
    public static javax.swing.JButton jButton66;
    public static javax.swing.JButton jButton71;
    public static javax.swing.JButton jButton73;
    public static javax.swing.JButton jButton75;
    public static javax.swing.JButton jButton77;
    public static javax.swing.JButton jButtonBranco01;
    public static javax.swing.JButton jButtonBranco03;
    public static javax.swing.JButton jButtonBranco05;
    public static javax.swing.JButton jButtonBranco07;
    public static javax.swing.JButton jButtonBranco10;
    public static javax.swing.JButton jButtonBranco12;
    public static javax.swing.JButton jButtonBranco14;
    public static javax.swing.JButton jButtonBranco16;
    public static javax.swing.JButton jButtonBranco21;
    public static javax.swing.JButton jButtonBranco23;
    public static javax.swing.JButton jButtonBranco25;
    public static javax.swing.JButton jButtonBranco27;
    public static javax.swing.JButton jButtonBranco30;
    public static javax.swing.JButton jButtonBranco32;
    public static javax.swing.JButton jButtonBranco34;
    public static javax.swing.JButton jButtonBranco36;
    public static javax.swing.JButton jButtonBranco41;
    public static javax.swing.JButton jButtonBranco43;
    public static javax.swing.JButton jButtonBranco45;
    public static javax.swing.JButton jButtonBranco47;
    public static javax.swing.JButton jButtonBranco50;
    public static javax.swing.JButton jButtonBranco52;
    public static javax.swing.JButton jButtonBranco54;
    public static javax.swing.JButton jButtonBranco56;
    public static javax.swing.JButton jButtonBranco61;
    public static javax.swing.JButton jButtonBranco63;
    public static javax.swing.JButton jButtonBranco65;
    public static javax.swing.JButton jButtonBranco67;
    public static javax.swing.JButton jButtonBranco70;
    public static javax.swing.JButton jButtonBranco72;
    public static javax.swing.JButton jButtonBranco74;
    public static javax.swing.JButton jButtonBranco76;
    public javax.swing.JLabel jLabel1;
    public javax.swing.JLabel jLabel2;
    public javax.swing.JLabel jLabel3;
    public javax.swing.JLabel jLabel4;
    javax.swing.JMenuItem jMenuItem1;
    javax.swing.JMenuItem jMenuItem3;
    javax.swing.JMenuItem jMenuItem4;
    javax.swing.JMenuItem jMenu_Estatistica;
    public javax.swing.JScrollPane jScrollPane1;
    public javax.swing.JLabel lbl_jogador;
    javax.swing.JPanel mainPanel;
    javax.swing.JMenuBar menuBar;
    javax.swing.JProgressBar progressBar;
    javax.swing.JLabel statusAnimationLabel;
    javax.swing.JLabel statusMessageLabel;
    javax.swing.JPanel statusPanel;
    public javax.swing.JTextArea txt_msg;
    public static javax.swing.JButton vazio;
    public static javax.swing.JButton vermelhoRealce;
    public static javax.swing.JButton vrmelha;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    private JDialog aboutBox;
    private JDialog EstatisticaBox;
    private Novo_Jogo NovoJogoBox;
    Jogador jogador;
    Engine engine;
    Estatistica estatistica = null;

}
